- 
                Notifications
    
You must be signed in to change notification settings  - Fork 97
 
Ability to exclude symbols from generated documentation #142
base: master
Are you sure you want to change the base?
Conversation
| 
           Thanks for sharing this PR, @biocross. I really appreciate your taking the time to work on this. I'm glad to see an alternative strategy to controlling the output of symbols in documentation (as opposed to a directive like   | 
    
| 
           Hi @mattt! For my use case, it's mostly been the documented symbols competing with more important information. Since there's no way to currently manually section / order the generated documentation instead of the default sectioning by symbol type (enums / structs / protocol), I decided to have an exclusion list to keep important information at the top. An example was to hide some unit testing related mock symbols, which ideally should be documented and included, but were being put at the top of generated documentation. Alternatively, we might also be able to use this list to also create a new section at the bottom of the generated documentation instead of excluding them altogether (sort of the like a less important symbols sections).  | 
    
| 
           I appreciate your expanding on that, @biocross. There's a discussion about how section headers / symbol organization should work in #107, and I'd be interested to get your take on that. 
 Curious to know more about this specific case. I wouldn't normally consider test-related symbols to be part of a public API (and therefore be documented) unless testing were the sole purpose of the module. Is there any reason why those mocks couldn't be   | 
    
          
 I was looking for this feature when I came across this. I could describe a couple of use-cases I have, if it helps: 
  | 
    
18b4d97    to
    81f2d3a      
    Compare
  
    

While a discussion is underway on how to exclude certain methods and properties in #101, this PR adds an argument to the
generatecommand to add the ability to exclude full top level symbols from the generated documentation.This is done using an external file containing a list of line separated symbol names, like:
This PR:
excluded-symbolsargument in thegeneratecommand options that takes in a path to a file containing a line separated list of symbols to be excluded. Defaults tonil.Moduleinitialiser, taking in an array ofexclusionsand filters the symbols by them.READMEandaction.ymlwith the new argument.